/*
 * 易族智汇（北京）科技有限公司 版权所有。
 * 未经许可，您不得使用此文件。
 * 官方地址：www.javamall.com.cn
 */
package com.enation.app.javashop.core.client.fallback.system;

import com.enation.app.javashop.core.client.feignimpl.system.FalsifyRecordClientFeignImpl;
import com.enation.app.javashop.core.handler.BaseFallbackFactory;
import com.enation.app.javashop.model.security.FalsifyRecord;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @author zs
 * @version v2.0
 * @Description: 篡改记录断路器
 * @date 2021-12-21
 * @since v7.0.0
 */
@Component
public class FalsifyRecordClientFallbackFactory extends BaseFallbackFactory<FalsifyRecordClientFeignImpl> implements FallbackFactory {


    @Override
    protected FalsifyRecordClientFeignImpl fallback() {
        return new FalsifyRecordClientFallback();
    }

    /**
     * @author zs
     * @version v2.0
     * @Description: 篡改记录断路器
     * @date 2021-12-21
     * @since v7.0.0
     */
    @Component
    public static class FalsifyRecordClientFallback implements FalsifyRecordClientFeignImpl {

        protected final Log logger = LogFactory.getLog(this.getClass());


        @Override
        public void add(FalsifyRecord falsifyRecord) {
            logger.error("添加篡改记录失败");
        }
    }
}
